<!DOCTYPE html>
<html lang="en" >
<head>
    <title>Atomsk - Program configuration file - Pierre Hirel</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" media="screen" type="text/css" title="Default" href="./default.css" />
    <link rel="icon" href="../img/atomsk_logo.png" type="image/png" />
</head>
   
<body>

<p><a href="./index.html">Back to main menu</a></p>

<h2>Program behaviour: setting up a configuration file</h2>

<h4>Syntax</h4>

<p>none</p>


<h4>Description</h4>

<p>The default behaviour of Atomsk can be changed by setting up a configuration file.</p>

<p><strong>When running on UNIX/Linux systems</strong>, the behaviour of the program can be set in a system-wide configuration file <code>/etc/atomsk.conf</code>. Each user can also customize the behaviour of the program by setting up his own personal configuration file, which must be placed in the user's configuration directory (defined by the environment variable <code>&#36;XDG_CONFIG_HOME</code> or, if the latter is not defined, defined to be the hidden directory <code>&#36;HOME/.config/</code>) and named <code>atomsk.conf</code>.</p>

<p><strong>When running on Microsoft&reg; Windows&reg; environments</strong>, each user can customize the behaviour of the program by setting up a personal configuration file, which must be placed in the user's personal directory (defined by the <code>%HOMEPATH%</code> environment variable) and named <code>atomsk.ini</code> (text file).</p>

<p>This configuration file has a pretty simple format. Empty lines and lines starting with the hash symbol (&#35;) are ignored, and the following keywords can be used:</p>

<ul>
  <li><strong>format &#60;format&#62;</strong>: indicates a format that Atomsk must always activate for output; several formats can be indicated by using this keyword several times (one line per keyword);</li>
  
  <li><strong>ignore &#60;value&#62;</strong>: if &#60;value&#62; is YES then conversion is skipped if output files already exist, otherwise Atomsk will ask; identical to the command-line option <a href="./progbe_ig.html"><code>-ignore</code></a>;</li>
  
  <li><strong>overw &#60;value&#62;</strong>: if &#60;value&#62; is YES then existing files are always overwritten, otherwise Atomsk will ask; identical to the command-line option <a href="./progbe_ow.html"><code>-overw</code></a>;</li>
  
  <li><strong>nthreads &#60;n&#62;</strong>: limits the maximum of OpenMP threads used by Atomsk to &#60;n&#62;; identical to the command-line option <a href="./progbe_Nthreads.html"><code>-nthreads</code></a>;</li>
  
  <li><strong>verbosity &#60;n&#62;</strong>: set the verbosity level to &#60;n&#62; ; identical to the command-line option <a href="./progbe_verb.html"><code>-verbosity</code></a>;</li>
  
  <li><strong>lang &#60;language&#62;</strong>: set the language of the program to &#60;language&#62; ; identical to the command-line option <a href="./progbe_lang.html"><code>-lang</code></a>;</li>
</ul>

<p>This configuration file is loaded at the very beginning of the program, before command-line options are interpreted, therefore command-line options will override the parameters that are set in this file.</p>



<h4>Default</h4>

<p>When no personal configuration file is found it is simply ignored, and the program runs with the <a href="./program_behaviour.html">default behaviour</a>.</p>



<h4>Example</h4>

<div class="txtfile"><h5>~/.config/atomsk.conf</h5>
<p><code># This is a comment<br/>
# Always output to xsf and cfg<br/>
format  xsf<br/>
format  cfg<br/>
<br/>
# If output files already exist,<br/>
# don't ask, just ignore them<br/>
overw   no<br/>
ignore  yes<br/>
<br/>
# Always run in silent mode<br/>
verbosity   0<br/>
</code></p></div>



<p><a href="./index.html">Back to main menu</a></p>

</body>

</html>
